#tag Class
Protected Class VariantTests
Inherits RBUnit.TestFixture
	#tag Method, Flags = &h0
		Sub VariantPrimitiveEqualityTest()
		  dim v1, v2 as Variant
		  v1 = "hello"
		  v2 = "hello"
		  Assert.IsTrue v1=v2, "are two variants with same string content equal?"
		  v2 = "Kilroy"
		  Assert.IsTrue v1<>v2, "are two variants with different string content not equal?"
		  
		  v1 = 99
		  v2 = 99
		  Assert.IsTrue v1=v2, "are two variants with same integer content equal?"
		  v2 = 90
		  Assert.IsTrue v1<>v2, "are two variants with different integer content not equal?"
		  
		  v1 = 99.3
		  v2 = 99.3
		  Assert.IsTrue v1=v2, "are two variants with same double content equal?"
		  v2 = 90.1
		  Assert.IsTrue v1<>v2, "are two variants with different double content not equal?"
		  
		  v1 = &c00ff00
		  v2 = &c00ff00
		  Assert.IsTrue v1=v2, "are two variants with same color content equal?"
		  v2 = &c00ffff
		  Assert.IsTrue v1<>v2, "are two variants with different color content not equal?"
		  
		  
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h0
		Sub VariantArrayEqualityTest()
		  dim anArray() as string = Array("sole array")
		  dim v1, v2 as Variant
		  
		  v1 = anArray
		  v2 = anArray
		  Assert.IsTrue v1=v2, "are two variants pointing to same string array equal?"
		  
		  v1 = Array("hello")
		  v2 = Array("hello")
		  Assert.IsTrue v1<>v2, "two variants with different array objects, same contents are NOT equal"
		  v2 = Array("Kilroy")
		  Assert.IsTrue v1<>v2, "are two variants with different string array content not equal?"
		  
		End Sub
	#tag EndMethod


	#tag ViewBehavior
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			InitialValue="-2147483648"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
	#tag EndViewBehavior
End Class
#tag EndClass
